import { LocalizationContext, MenuItem } from "../../core";

import FullScreenIcon from "./FullScreenIcon";
import { FC, useContext } from "react";

export interface EnterFullScreenMenuItemProps {
  onClick(): void;
}

const EnterFullScreenMenuItem: FC<EnterFullScreenMenuItemProps> = ({
  onClick,
}) => {
  const l10n = useContext(LocalizationContext);
  const label =
    l10n && l10n.fullScreen ? l10n.fullScreen.enterFullScreen : "Full screen";

  return (
    <MenuItem icon={<FullScreenIcon />} onClick={onClick}>
      {label}
    </MenuItem>
  );
};

export default EnterFullScreenMenuItem;
